from flask import jsonify

from app.models.user import User
from app.user import user_bp
from app.utils import json_utils


@user_bp.route("/")
def index():
    # 查询所有用户
    users = User.query.all()
    return jsonify([json_utils.obj_to_json(user) for user in users])
